//
//  MoreCustomTableViewCell.m
//  SYiDaiy
//
//  Created by dllo on 16/9/12.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MoreCustomTableViewCell.h"
#import "TAMacro.h"

@implementation MoreCustomTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _iconImageView = [UIImageView new];
        [self.contentView addSubview:_iconImageView];
        _nameLabel = [UILabel new];
        _nameLabel.font = [UIFont systemFontOfSize:17];
        [self.contentView addSubview:_nameLabel];
        _descLabel = [UILabel new];
        _descLabel.font = [UIFont systemFontOfSize:15];
        _descLabel.textColor = [UIColor blackColor];
        _descLabel.alpha = 0.4;
        _descLabel.numberOfLines = 0;
        [self.contentView addSubview:_descLabel];
    }
    return self;
}

- (void)layoutSubviews
{
    CGFloat imageWidth = SCREEN_WIDTH / 375 * 80;
    _iconImageView.frame = CGRectMake(5, 5, imageWidth, imageWidth);
    _nameLabel.frame = CGRectMake(imageWidth + 10, 5, SCREEN_WIDTH - imageWidth - 15, imageWidth / 3);
    _descLabel.frame = CGRectMake(imageWidth + 10, imageWidth / 3 + 5, SCREEN_WIDTH - imageWidth - 15, imageWidth / 3 * 2);
    _descLabel.numberOfLines = 0;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
